﻿<UserControl x:Class="DHLTab"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:data="clr-namespace:System.Windows.Data;assembly=PresentationFramework"
             xmlns:Fluent="clr-namespace:Fluent;assembly=Fluent"
             xmlns:local="clr-namespace:PacketTracking"
             mc:Ignorable="d" 
             d:DesignHeight="403" d:DesignWidth="1079">
    <Grid Name="Grid1">
        <Fluent:RibbonTabItem Header="Sendungsverfolgung" Name="dhl">
            <Fluent:RibbonGroupBox Header="">
                <Fluent:Button Name="buttonOverviewDHL" Header="Packetübersicht" Icon="pack://application:,,,/PacketTracking;component/Images/post2ena.png" LargeIcon="pack://application:,,,/PacketTracking;component/Images/post2ena.png">
                    <Fluent:Button.ToolTip>
                        <Fluent:ScreenTip Title="Packetübersicht" Width="450" Image="pack://application:,,,/PacketTracking;component/Images/post2ena.png" HelpLabelVisibility="Collapsed" Text="Verschaffen Sie sich einen Überblick über Ihre versendeten Pakete." />
                    </Fluent:Button.ToolTip>
                </Fluent:Button>
                <Fluent:Button Name="buttonStatsDHL" Header="Paketstatistiken" Icon="Images\auftragedit.png" LargeIcon="Images\auftragedit.png" IsEnabled="False" Visibility="Collapsed">
                    <Fluent:Button.ToolTip>
                        <Fluent:ScreenTip Title="Auftrag bearbeiten" Width="450" HelpTopic="Hilfe zur Erfassung eines neuen Auftrags" HelpLabelVisibility="Collapsed" Text="Mit dieser Funktion können Sie einen in der Liste markierten Auftrag bearbeiten." DisableReason="Sie haben keinen Auftrag in der Liste ausgewählt."/>
                    </Fluent:Button.ToolTip>
                </Fluent:Button>
            </Fluent:RibbonGroupBox>
            <Fluent:RibbonGroupBox Header="Versandzeitraum">
                <Fluent:Button Name="buttonDateStart" Header="Vom " Icon="pack://application:,,,/PacketTracking;component/Images/vcalendar.png" LargeIcon="Images/vcalendar.png">
                    <Fluent:Button.ToolTip>
                        <Fluent:ScreenTip Title="Startdatum" Width="450" Image="pack://application:,,,/PacketTracking;component/Images/vcalendar.png" HelpLabelVisibility="Collapsed" Text="Legen Sie das Startdatum fest, um nur die Pakete aus dem gewünschten Zeitraum anzuzeigen" />
                    </Fluent:Button.ToolTip>
                </Fluent:Button>
                <Fluent:Button Name="buttonDateEnd" Header="Bis zum " Icon="pack://application:,,,/PacketTracking;component/Images/vcalendar.png" LargeIcon="Images/vcalendar.png">
                    <Fluent:Button.ToolTip>
                        <Fluent:ScreenTip Title="Startdatum" Width="450" Image="pack://application:,,,/PacketTracking;component/Images/vcalendar.png" HelpLabelVisibility="Collapsed" Text="Legen Sie das Startdatum fest, um nur die Pakete aus dem gewünschten Zeitraum anzuzeigen" />
                    </Fluent:Button.ToolTip>
                </Fluent:Button>
            </Fluent:RibbonGroupBox>
            <Fluent:RibbonGroupBox Header="Aktualisieren">
                <Fluent:Button Name="buttonRefresh" Header="Sendungsdaten aktualisieren" Icon="pack://application:,,,/PacketTracking;component/Images/reload.png" LargeIcon="Images/reload.png">
                    <Fluent:Button.ToolTip>
                        <Fluent:ScreenTip Title="Sendungsdaten aktualisieren" Width="450" Image="pack://application:,,,/PacketTracking;component/Images/reload.png" Text="Klicken Sie auf diesen Button, um die Sendungsdaten in der Tabelle neu abzufragen." />
                    </Fluent:Button.ToolTip>
                </Fluent:Button>
            </Fluent:RibbonGroupBox>
        </Fluent:RibbonTabItem>
        <TabControl Name="TabControl">
            <TabItem Name="t1" Visibility="Collapsed" Background="Transparent">
                <Grid>
                    <Grid Margin="6,40,6,6" Name="Grid2">
                        <Grid.ColumnDefinitions>
                            <ColumnDefinition Width="*" />
                            <ColumnDefinition Width="*" />
                        </Grid.ColumnDefinitions>
                        <ListView Name="ListView1" Margin="0" ItemsSource="{Binding}" >
                            <ListView.ItemContainerStyle>
                                <Style TargetType="ListViewItem">
                                    <Setter Property="HorizontalContentAlignment" Value="Center" />
                                    <Setter Property="MinHeight" Value="20px" />
                                </Style>
                            </ListView.ItemContainerStyle>
                            <ListView.View>
                                <GridView>
                                    <GridViewColumn Header="Datum" DisplayMemberBinding="{Binding Date}" Width="{Binding ElementName=helperWidth1, Path=ActualWidth}" x:Name="ColumnDatum"/>
                                    <GridViewColumn Header="Packetnummer" DisplayMemberBinding="{Binding Number}" Width="{Binding ElementName=helperWidth2, Path=ActualWidth}" x:Name="ColumnNr"/>
                                    <GridViewColumn Header="Versender" DisplayMemberBinding="{Binding Packager}" Width="{Binding ElementName=helperWidth3, Path=ActualWidth}" x:Name="ColumnVersender"/>
                                    <GridViewColumn Header="Letzter Status" DisplayMemberBinding="{Binding LastState}" Width="{Binding ElementName=helperWidth4, Path=ActualWidth}" x:Name="ColumnStatus"/>
                                </GridView>
                            </ListView.View>
                        </ListView>
                        <Grid Margin="0,45,0,-45" Visibility="Hidden">
                            <Grid.ColumnDefinitions>
                                <!--Width is bound to width of the first GridViewColumn -->
                                <ColumnDefinition Width="*" MaxWidth="100"/>
                                <ColumnDefinition Width="*"  MaxWidth="175"/>
                                <ColumnDefinition Width="*" MaxWidth="100"/>
                                <ColumnDefinition Width="1.5*"/>
                                <ColumnDefinition Width="0.15*"/>
                            </Grid.ColumnDefinitions>
                            <Grid Grid.Column="0" x:Name="helperWidth1" />
                            <Grid Grid.Column="1" x:Name="helperWidth2" Background="Aqua"/>
                            <Grid Grid.Column="2" x:Name="helperWidth3" Background="Beige"/>
                            <Grid Grid.Column="3" x:Name="helperWidth4" Background="BlanchedAlmond"/>
                        </Grid>
                        <ScrollViewer VerticalScrollBarVisibility="Auto" Margin="5,0,0,5" Grid.Column="1" >
                            <StackPanel Name="ItemsPanel"/>
                        </ScrollViewer>
                    </Grid>
                    <Label Content="Paketübersicht" Height="28" HorizontalAlignment="Left" Margin="6,6,0,0" Name="Label1" VerticalAlignment="Top" FontSize="14" FontWeight="Bold" Foreground="DimGray"/>
                </Grid>
            </TabItem>
        </TabControl>
    </Grid>
</UserControl>
